﻿@model HZU.ZP.Domain.Model.HandleResumeView
@{
    Layout = "_CompanyLayout";
}
<script>
    $(document).ready(function () {
        $(".projectExperience1").mouseover(function () {
            $(this).css({ "border": "1px solid red", "width": "98%", "margin-bottom": "2px" });
        }).mouseout(function () {
            $(this).css({ "border": "0px" });
        });
        $("#interest").click(function () {
            if (confirm("确实对此应聘者感兴趣吗？")) {
                $.ajax({
                    type: 'post',
                    url: '/ApplyRecord/Update',
                    data: 'applyRecordId=@Model.ApplyRecordId&processing=3',
                    success: function (message) {
                        if (message.returnCode == "001") {
                            alert("处理成功！");
                            location.reload();
                        } else if (message.returnCode == "999") {
                            alert("该申请记录不存在！");
                        }else if (message.returnCode == "4040") {
                            alert("该申请记录已处理！");
                        }
                    }
                });
            }
            else {}
        });
        $("#inappropriate").click(function () {
            if (confirm("确实此应聘者不适合改职位吗？")) {
                $.ajax({
                    type: 'post',
                    url: '/ApplyRecord/Update',
                    data: 'applyRecordId=@Model.ApplyRecordId&processing=5',
                    success: function (message) {
                        if (message.returnCode == "001") {
                            alert("处理成功！");
                            location.reload();
                        } else if (message.returnCode == "999") {
                            alert("该申请记录不存在！");
                        }else if (message.returnCode == "4040") {
                            alert("该申请记录已处理！");
                        }
                    }
                });
            }
            else {}
        });
        $("#invitation").click(function () {
                $.ajax({
                    type: 'post',
                    url: '/ApplyRecord/Update',
                    data: 'applyRecordId=@Model.ApplyRecordId&processing=4',
                    success: function (message) {
                        if (message.returnCode == "001") {
                            location.href="/ApplyRecord/SendEmail?companyEmail=@User.Identity.Name&applyRecordId=@Model.ApplyRecordId";
                        } else if (message.returnCode == "999") {
                            alert("该申请记录不存在！");
                        }else if (message.returnCode == "4040") {
                            alert("该申请记录已处理！");
                        }
                    }
                });
        });
    });
</script>
<div class="container">
    @if (Model.Resume.Information != null)
    {<nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">基本信息</a>
                </div>
            </div>
        </nav>
        <h3>@Model.Resume.Information.Name</h3>
        <p>
            现居地：<span>@Model.Resume.Information.Municipal</span>
            &thinsp; |&thinsp;<span>@Model.Resume.Information.Sex</span>
            &thinsp; |&thinsp;<span>@Model.Resume.Information.Birthday.ToString("d")</span>
            &thinsp; |&thinsp;<span>@Model.Resume.Information.JobStatus</span>
            &thinsp; |&thinsp;联系方式：<span>@Model.Resume.Information.PhoneNumber</span>
            &thinsp; |&thinsp;邮箱：<span>@Model.Resume.Information.Email</span>
        </p>
    }
    @if (Model.Resume.SelfEvaluation != null)
    {
        <nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">个人优势</a>
                </div>
            </div>
        </nav>
        <textarea style="border:none; height:128px;width:98%" readonly>@Model.Resume.SelfEvaluation.Advantage</textarea>
    }
    @if (Model.Resume.JobIntention != null)
    {
        <nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">求职意向</a>
                </div>
            </div>
        </nav>
        <h4>
            地点：<span>@Model.Resume.JobIntention.Municipal</span>
            &thinsp; |&thinsp;薪资：<span>@Model.Resume.JobIntention.SalaryExpectation</span>
            &thinsp; |&thinsp;行业：<span>@Model.Resume.JobIntention.SmallIndustry</span>
            &thinsp; |&thinsp;职位：<span>@Model.Resume.JobIntention.SmallPosition</span>
        </h4>
    }
    @if (Model.Resume.MasterSkills.Count() >= 1)
    {
        <nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">掌握技能</a>
                </div>
            </div>
        </nav>
        <table class="gridtable">
            <thead>
                <tr>
                    <th class="container">技能名称</th>
                    <th style="text-align:center" class="container">熟练程度</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var masterSkill in Model.Resume.MasterSkills)
                {
                    <tr>
                        <td>@masterSkill.Skill</td>
                        <td style="text-align:center">@masterSkill.Level</td>
                    </tr>

                }
            </tbody>
        </table>
    }
    @if (Model.Resume.Awards.Count() >= 1)
    {
        <nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">获得奖项</a>
                </div>
            </div>
        </nav>
        <table class="gridtable">
            <thead>
                <tr>
                    <th class="container">获得时间</th>
                    <th style="text-align:center" class="container">奖项名称</th>
                    <th style="text-align:center" class="container">等级</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var award in Model.Resume.Awards)
                {
                    <tr>
                        <td>@award.GetTime.ToString("d")</td>
                        <td style="text-align:center">@award.AwardName</td>
                        <td style="text-align:center">@award.Achievement</td>
                    </tr>

                }
            </tbody>
        </table>
    }
    @if (Model.Resume.ProjectExperiences.Count() >= 1)
    {
        <nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">项目经验</a>
                </div>
            </div>
        </nav>
        foreach (var projectExperience in Model.Resume.ProjectExperiences)
        {
            <div class="projectExperience1">
                <p>
                    <span class="spanName">@projectExperience.StartTime.ToString("yyyy/MM")-@projectExperience.EndTime.ToString("yyyy/MM")</span>
                    <span class="spanName">@projectExperience.ProjectName</span>
                    <span class="spanName">@projectExperience.ProjectRole</span>
                </p>
                <div>项目经验： <textarea style="border:none; height:128px;width:98%" readonly>@projectExperience.ProDescription</textarea></div>
                <div>项目责任： <textarea style="border:none; height:128px;width:98%" readonly>@projectExperience.ResDescription</textarea></div>
            </div>
        }
    }
    @if (Model.Resume.EducationExperiences.Count() >= 1)
    {
        <nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">教育经历</a>
                </div>
            </div>
        </nav>
        foreach (var educationExperience in Model.Resume.EducationExperiences)
        {
            <div class="projectExperience1">
                <p>
                    <span class="spanNameEdu">@educationExperience.StartTime.ToString("yyyy/MM")-@educationExperience.EndTime.ToString("yyyy/MM")</span>
                    <span class="spanNameEdu">@educationExperience.SchoolName</span>
                    <span class="spanNameEdu">@educationExperience.MajorName</span>
                    <span class="spanNameEdu">@educationExperience.AcademicDegree</span>
                </p>
                <div>在校经历： <textarea style="border:none; height:128px;width:98%" readonly>@educationExperience.MajorDescription</textarea></div>
            </div>
        }
    }
    @if (Model.Processing == 1 || Model.Processing == 2)
    {
        <div class="row clearfix">
            <div class="col-md-4 column">
                <button type="button" class="btn btn-default btn-warning" style="width:50%;" id="interest">感兴趣</button>
            </div>
            <div class="col-md-4 column">
                <button type="button" class="btn btn-default btn-info" style="width:50%;" id="invitation">邀面试</button>
            </div>
            <div class="col-md-4 column">
                <button type="button" class="btn btn-default btn-danger" style="width:50%;" id="inappropriate">不合适</button>
            </div>
        </div>
    }
    @if (Model.Processing == 3)
    {
        <div class="row clearfix">
            <div class="col-md-6 column">
                <button type="button" class="btn btn-default btn-info" style="width:50%;" id="invitation">邀面试</button>
            </div>
            <div class="col-md-6 column">
                <button type="button" class="btn btn-default btn-danger" style="width:50%;" id="inappropriate">不合适</button>
            </div>
        </div>
    }
    @if (Model.Processing == 4)
    {
        <div class="row clearfix">
            <div class="col-md-4 column">
            </div>
            <div class="col-md-4 column">
                <a href="/ApplyRecord/SendEmail?companyEmail=@User.Identity.Name&applyRecordId=@Model.ApplyRecordId" class="btn btn-default btn-info" style="width:100%;">邀面试</a>
            </div>
            <div class="col-md-4 column">
            </div>
        </div>
    }
</div>